Next | Prev | Up | Top | Contents | Index

Using Framebuffer Image Data for Color Tables

If the copy texture extension is supported, you can define a color table using image data in the framebuffer. Call glCopyColorTableSGI(), which accepts image data from a color buffer region (width pixel wide by one pixel high) whose left pixel has window coordinates x,y. If any pixels within this region are outside the window that is associated with the OpenGL context, the values obtained for those pixels are undefined.

The pixel values are processed exactly as if glCopyPixels() had been called, until just before the application of pixel transfer modes (see the illustration "Drawing Pixels with glDrawPixels*()" in Chapter 8, "Bitmaps, Fonts, and Images," of the OpenGL Programming Guide).

At this point all pixel component values are treated exactly as if glColorTableSGI() had been called, beginning with the scaling of the color components by GL_COLOR_TABLE_SCALE_SGI. The semantics and accepted values of the target and internalformat parameters are exactly equivalent to their glColorTableSGI() counterparts.


Next | Prev | Up | Top | Contents | Index